import request from '@/utils/request'

/**获取品牌 */
export const brandSearch = ({ qw, page, size }) =>
  request({
    url: '/api/brand/search',
    method: 'get',
    params: {
      qw,
      page,
      size,
    },
  })
/**获取品牌 */
export const brandFromid = ({ id }) =>
  request({
    url: '/api/brand/fromid',
    method: 'get',
    params: {
      id,
    },
  })

/**新增品牌 */
export const brandAdd = ({ name, logo, classifys }) =>
  request({
    url: '/api/brand/add',
    method: 'post',
    data: {
      name,
      logo,
      classifys,
    },
  })
/**修改品牌 */
export const brandModify = ({ id, name, logo, classifys }) =>
  request({
    url: '/api/brand/modify',
    method: 'post',
    data: {
      id,
      name,
      logo,
      classifys,
    },
  })
/**删除品牌 */
export const brandDel = ({ id }) =>
  request({
    url: '/api/brand/del',
    method: 'post',
    data: {
      id,
    },
  })
/**批量删除分类 */
export const brandDels = ({ ids }) =>
  request({
    url: '/api/brand/dels',
    method: 'post',
    data: {
      ids,
    },
  })
